//
//  ViewController.m
//  NetworkDemo
//
//  Created by 万孟超 on 2022/1/10.
//

#import "ViewController.h"
#import "NetworkBaseRequest.h"
#import "BusiNetworkManager.h"

@interface ViewController ()

@property (nonatomic, strong) NetworkEngine *videoEngine;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self testNetwork];
//    [self.videoEngine cancelNetwork];
}

- (void)testNetwork {
    NetworkBaseRequest *request = [[NetworkBaseRequest alloc] init];
    request.methodUrl = @"https://api.apiopen.top/todayVideo";
    request.method = @"searchTodayVideo";
    request.params = @{};
    self.videoEngine = [BusiNetworkManager queryNetworkWithEngineTarget:self request:request completeBlock:^(id  _Nullable result) {
        NSLog(@"请求结果:%@",result);
    } errorBlock:^(NSError * _Nullable error) {
        
    }];
}

@end
